package com.jcake.services.client;

import java.util.ArrayList;
import java.util.List;

import com.polarrose.json.annotations.JsonHint;

public class RemoteCallErrors {

	private List<RemoteCallError> errors = new ArrayList<RemoteCallError>();

	public List<RemoteCallError> getErrors() {
		if (errors == null) {
			errors = new ArrayList<RemoteCallError>();
		}
		return errors;
	}

	public void addInvocationError(RemoteCallError error) {
		if (errors == null) {
			errors = new ArrayList<RemoteCallError>();
		}
		errors.add(error);
	}

	@JsonHint(className = RemoteCallError.class)
	public void setErrors(List<RemoteCallError> errors) {
		this.errors = errors;
	}
}
